<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Base extends MY_agent_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	/*
	public function index()
	{
		$this->load->view('welcome_message');
	}
	//*/


	public function index()
	{
		//$this->load->model('model_order', 'order');
		//$orderInfo = $this->order->getOrder(5, 0, '*', null, 'create_time desc');

		//$this->load->model('model_city', 'city');
		//$city = $this->city->getCity(10000, 0, '*', array('is_del' => '0'));

		//$this->load->model('model_pay', 'pay');
		//$pay = $this->pay->getPay(5, 0, '*', null, 'create_time desc');

		//$this->load->model('model_feedback', 'feedback');
		//$feedback = $this->feedback->getFeedback(5, 0, '*', null, 'create_time desc');

		$this->load->model('user/model_user', 'u');
		$user = $this->u->lists(0, 5);

		$data = array(
			//'order' => $orderInfo,
			//'cityInfo' => $city,
			//'pay' => $pay,
			//'feedback' => $feedback,
			'user' => $user,
			'order_status' => config_item('order_status'),
			'pay_status' => config_item('pay_status'),
			'is_post' => config_item('is_post'),
			'user_type' => config_item('user_type'),
			'user_status' => config_item('user_status'),
			'process_status' => config_item('process_status'),
		);
		$this->load->view('agent/index', $data);
	}
	
/**
     * 发送短信
     */
    public function send_sms()
    {
        $mobile = $this->uInfo['mobile'];
        $type   = (int)($this->input->get_post('type'));


        $this->load->service('common/service_common_send_sms');
        $data = $this->service_common_send_sms->send($mobile, $type);

        $_error = error($data['status']);
        
        $r = array
        (
        		'msg'  => $_error['msg'],
        		'code' => $data['status'],
        );
        
        $this->$this->json_output($r);
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */